from sqlalchemy import Column, Integer, String
from db import Base


class User(Base):
    __tablename__ = "users"
    id = Column(Integer, primary_key=True, index=True)
    phone = Column(String(50), nullable=False, unique=True)
    name = Column(String(50), nullable=False, unique=True)
    password = Column(String(100), nullable=False)


class Root(Base):
    __tablename__ = "root"
    id = Column(Integer, primary_key=True, index=True)
    phone = Column(String(50), nullable=False, unique=True)
    name = Column(String(50), nullable=False, unique=True)
    password = Column(String(100), nullable=False)

class dictionary(Base):
    __tablename__ = "dictionary"
    id = Column(Integer, primary_key=True, index=True)
    EN=Column(String(250), nullable=False, unique=True)
    ZH=Column(String(250), nullable=False, unique=True)
    UY=Column(String(250), nullable=False, unique=True)

class Harp(Base):
    __tablename__ = "harp"
    id = Column(Integer, primary_key=True, index=True)
    one = Column(String(50), nullable=True)
    two = Column(String(50), nullable=True)
    thure = Column(String(50), nullable=True)
    four = Column(String(50), nullable=True)
    five = Column(String(50), nullable=True)
    six = Column(String(50), nullable=True)
    seven = Column(String(50), nullable=True)
    eight = Column(String(50), nullable=True)
    attribute = Column(Integer, nullable=False)
    title = Column(String(16), nullable=False, unique=True)
    attributes=Column(String(250), nullable=False)




class HarpAudio(Base):
    __tablename__ = "harp_audio"
    id = Column(Integer, primary_key=True, index=True)
    harp_id = Column(String(50), nullable=False, unique=True)
    audio_url = Column(String(250), nullable=False, unique=True)
    one = Column(String(50), nullable=True)
    two = Column(String(50), nullable=True)
    thure = Column(String(50) , nullable=True)
    four = Column(String(50), nullable=True)
    five = Column(String(50), nullable=True)
    six = Column(String(50), nullable=True)
    seven = Column(String(50), nullable=True)
    eight = Column(String(50), nullable=True)
